package com.sdgakj.enums;

public enum EnumPayType {
    WXPAY(1, "微信支付"), ALIPAY(2, "支付宝支付"),ALLINPAY(3, "通联支付");

    private Integer code;

	private String name;

    private EnumPayType(Integer code, String name) {
		this.code = code;
		this.name = name;
	}

    public Integer getCode() {
		return code;
	}

    public void setCode(Integer code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static EnumPayType getEnum(String value) {
		for (EnumPayType e : EnumPayType.values()) {
			if (value.equals(e.getCode())) {
				return e;
			}
		}
		return null;
	}
}
